package com.nm.web.controller;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;


/**
 * Created by hewu on 2017/2/7 0007.
 */
@Controller
@RequestMapping(path = "", method = RequestMethod.GET)
public class IndexController {

    @RequestMapping(path = "/index")
    public ModelAndView findAll() {
        ModelAndView mode = new ModelAndView();
        mode.setViewName("/admin/index");
        return mode;
    }

    @RequestMapping(path = "" ,method = {RequestMethod.GET,RequestMethod.POST})
    public ResponseEntity<Object> findAll2(){
        return ResponseEntity.ok(new Object());
    }
}
